<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>相似度比较结果</title>
    <meta charset="UTF-8">
    <link href="/assets/bootstrap/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
    <div class="container mt-5">
        <h2 class="mb-4">相似度比较结果</h2>
        
        <div class="card mb-4">
            <div class="card-header">
                <h4 class="mb-0">当前课程信息</h4>
            </div>
            <div class="card-body">
                <p><strong>学期：</strong><span th:text="${kcjxzj.xueqi}"></span></p>
                <p><strong>课程名称：</strong><span th:text="${kcjxzj.course}"></span></p>
                <p><strong>教师：</strong><span th:text="${kcjxzj.teacher}"></span></p>
                <p><strong>教学班次：</strong><span th:text="${kcjxzj.tclass}"></span></p>
            </div>
        </div>

        <div class="card mb-4">
            <div class="card-header">
                <h4 class="mb-0">相似度分析结果</h4>
            </div>
            <div class="card-body">
                <!-- 教学方法相似度 -->
                <div class="mb-4">
                    <h5>主要教学方法</h5>
                    <div class="alert alert-info">
                        <div class="d-flex justify-content-between align-items-center">
                            <h6 class="mb-3">相似度：<span class="badge bg-primary" th:text="${jxffSimilarity + '%'}"></span></h6>
                        </div>
                        <div class="card">
                            <div class="card-header">
                                最相似的课程
                            </div>
                            <div class="card-body">
                                <div th:if="${jxffMostSimilar != null}">
                                    <p><strong>课程名称：</strong><span th:text="${jxffMostSimilar.course}"></span></p>
                                    <p><strong>教师：</strong><span th:text="${jxffMostSimilar.teacher}"></span></p>
                                    <p><strong>学期：</strong><span th:text="${jxffMostSimilar.xueqi}"></span></p>
                                    <p><strong>教学班次：</strong><span th:text="${jxffMostSimilar.tclass}"></span></p>
                                    <p><strong>教学方法内容：</strong></p>
                                    <pre class="p-2 bg-light" th:text="${jxffMostSimilar.jxff}"></pre>
                                </div>
                                <div th:if="${jxffMostSimilar == null}" class="alert alert-warning">
                                    未找到相似的课程
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 形成性考核分析相似度 -->
                <div class="mb-4">
                    <h5>形成性考核情况分析</h5>
                    <div class="alert alert-info">
                        <div class="d-flex justify-content-between align-items-center">
                            <h6 class="mb-3">相似度：<span class="badge bg-primary" th:text="${xcxfxSimilarity + '%'}"></span></h6>
                        </div>
                        <div class="card">
                            <div class="card-header">
                                最相似的课程
                            </div>
                            <div class="card-body">
                                <div th:if="${xcxfxMostSimilar != null}">
                                    <p><strong>课程名称：</strong><span th:text="${xcxfxMostSimilar.course}"></span></p>
                                    <p><strong>教师：</strong><span th:text="${xcxfxMostSimilar.teacher}"></span></p>
                                    <p><strong>学期：</strong><span th:text="${xcxfxMostSimilar.xueqi}"></span></p>
                                    <p><strong>教学班次：</strong><span th:text="${xcxfxMostSimilar.tclass}"></span></p>
                                    <p><strong>形成性考核分析内容：</strong></p>
                                    <pre class="p-2 bg-light" th:text="${xcxfxMostSimilar.xcxfx}"></pre>
                                </div>
                                <div th:if="${xcxfxMostSimilar == null}" class="alert alert-warning">
                                    未找到相似的课程
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 试卷分析相似度 -->
                <div class="mb-4">
                    <h5>试卷分析</h5>
                    <div class="alert alert-info">
                        <div class="d-flex justify-content-between align-items-center">
                            <h6 class="mb-3">相似度：<span class="badge bg-primary" th:text="${sjfxSimilarity + '%'}"></span></h6>
                        </div>
                        <div class="card">
                            <div class="card-header">
                                最相似的课程
                            </div>
                            <div class="card-body">
                                <div th:if="${sjfxMostSimilar != null}">
                                    <p><strong>课程名称：</strong><span th:text="${sjfxMostSimilar.course}"></span></p>
                                    <p><strong>教师：</strong><span th:text="${sjfxMostSimilar.teacher}"></span></p>
                                    <p><strong>学期：</strong><span th:text="${sjfxMostSimilar.xueqi}"></span></p>
                                    <p><strong>教学班次：</strong><span th:text="${sjfxMostSimilar.tclass}"></span></p>
                                    <p><strong>试卷分析内容：</strong></p>
                                    <pre class="p-2 bg-light" th:text="${sjfxMostSimilar.sjfx}"></pre>
                                </div>
                                <div th:if="${sjfxMostSimilar == null}" class="alert alert-warning">
                                    未找到相似的课程
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 成绩分析相似度 -->
                <div class="mb-4">
                    <h5>成绩分析</h5>
                    <div class="alert alert-info">
                        <div class="d-flex justify-content-between align-items-center">
                            <h6 class="mb-3">相似度：<span class="badge bg-primary" th:text="${cjfxSimilarity + '%'}"></span></h6>
                        </div>
                        <div class="card">
                            <div class="card-header">
                                最相似的课程
                            </div>
                            <div class="card-body">
                                <div th:if="${cjfxMostSimilar != null}">
                                    <p><strong>课程名称：</strong><span th:text="${cjfxMostSimilar.course}"></span></p>
                                    <p><strong>教师：</strong><span th:text="${cjfxMostSimilar.teacher}"></span></p>
                                    <p><strong>学期：</strong><span th:text="${cjfxMostSimilar.xueqi}"></span></p>
                                    <p><strong>教学班次：</strong><span th:text="${cjfxMostSimilar.tclass}"></span></p>
                                    <p><strong>成绩分析内容：</strong></p>
                                    <pre class="p-2 bg-light" th:text="${cjfxMostSimilar.cjfx}"></pre>
                                </div>
                                <div th:if="${cjfxMostSimilar == null}" class="alert alert-warning">
                                    未找到相似的课程
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 教学总结相似度 -->
                <div class="mb-4">
                    <h5>课程教学总结</h5>
                    <div class="alert alert-info">
                        <div class="d-flex justify-content-between align-items-center">
                            <h6 class="mb-3">相似度：<span class="badge bg-primary" th:text="${zjSimilarity + '%'}"></span></h6>
                        </div>
                        <div class="card">
                            <div class="card-header">
                                最相似的课程
                            </div>
                            <div class="card-body">
                                <div th:if="${zjMostSimilar != null}">
                                    <p><strong>课程名称：</strong><span th:text="${zjMostSimilar.course}"></span></p>
                                    <p><strong>教师：</strong><span th:text="${zjMostSimilar.teacher}"></span></p>
                                    <p><strong>学期：</strong><span th:text="${zjMostSimilar.xueqi}"></span></p>
                                    <p><strong>教学班次：</strong><span th:text="${zjMostSimilar.tclass}"></span></p>
                                    <p><strong>教学总结内容：</strong></p>
                                    <pre class="p-2 bg-light" th:text="${zjMostSimilar.zj}"></pre>
                                </div>
                                <div th:if="${zjMostSimilar == null}" class="alert alert-warning">
                                    未找到相似的课程
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 意见建议相似度 -->
                <div class="mb-4">
                    <h5>意见建议</h5>
                    <div class="alert alert-info">
                        <div class="d-flex justify-content-between align-items-center">
                            <h6 class="mb-3">相似度：<span class="badge bg-primary" th:text="${yjjySimilarity + '%'}"></span></h6>
                        </div>
                        <div class="card">
                            <div class="card-header">
                                最相似的课程
                            </div>
                            <div class="card-body">
                                <div th:if="${yjjyMostSimilar != null}">
                                    <p><strong>课程名称：</strong><span th:text="${yjjyMostSimilar.course}"></span></p>
                                    <p><strong>教师：</strong><span th:text="${yjjyMostSimilar.teacher}"></span></p>
                                    <p><strong>学期：</strong><span th:text="${yjjyMostSimilar.xueqi}"></span></p>
                                    <p><strong>教学班次：</strong><span th:text="${yjjyMostSimilar.tclass}"></span></p>
                                    <p><strong>意见建议内容：</strong></p>
                                    <pre class="p-2 bg-light" th:text="${yjjyMostSimilar.yjjy}"></pre>
                                </div>
                                <div th:if="${yjjyMostSimilar == null}" class="alert alert-warning">
                                    未找到相似的课程
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="mb-4">
            <a href="/compare/form" class="btn btn-primary">返回重新比较</a>
        </div>
    </div>
    <script src="/assets/bootstrap/js/bootstrap.bundle.min.js"></script>
</body>
</html>